<?php
/**
 * Created by PhpStorm.
 * User: cape
 * Date: 2017/10/10
 * Time: 9:59
 */


function gen_three_nulls(){
    foreach(range(1, 3) as $i){
        yield;
    }
}

var_dump(iterator_to_array(gen_three_nulls()));






